import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from "../views/login/Login.vue";
const Insuresorders = () => import('../components/insuresorders/InsuresOrdersList.vue')
const InsuresList = () => import('../components/insures/InsuresList.vue')
const TypesList = () => import('../components/types/TypesList.vue')

const ModifyInsures = () => import('../components/insuresorders/ModifyInsures.vue')
const OrdersList = () => import('@c/admins/OrdersList.vue')
const Process = () => import('@c/admins/Process.vue')
const CustomerList = () => import('../components/customer/CustomerList.vue');
const CustomerAdd = () => import('../components/customer/CustomerAdd.vue');
const CustomerUpdate = () => import('../components/customer/CustomerUpdate.vue');
const MyClaimsList = () => import('../components/salesmansclaims/salesmansclaimsList.vue')
const ClaimsList = () => import('../components/claims/ClaimsList.vue')
const SubmitClaimMsg = () => import('../components/salesmansclaims/addsalesmansclaims.vue')
const UpdateSalesmansClaims = () => import('../components/salesmansclaims/updatesalesmansclaims.vue')
// const Login =() =>import('../views/login/Login.vue')

const AdminList = () => import('../components/admins/AdminList.vue')
const AdminAdd = () => import('../components/admins/AdminAdd.vue')
const AdminUpdate = () => import('../components/admins/AdminUpdate.vue')
const SalesmansList = () => import('../components/salesmansother/SalesmansList.vue')
const SalesmansAdd = () => import('../components/salesmansother/SalesmansAdd.vue')
const SalesmansModify = () => import('../components/salesmansother/SalesmansModify.vue')
const SalesmansPersonally = () => import('../components/salesmansother/SalesmansPerson.vue')
const SalesmansPersonallyPassword = () => import('../components/salesmansother/SalesmansPersonallyPassword.vue')
const MycustomerList = () => import('../components/mycustomer/MycustomerList.vue');

Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect: '/System',
},
{
    path: '/Login',
    name: 'Login',
    component: Login,
},
{
    path: '/System',
    name: 'System',
    component: () => import('../views/system/System.vue'),
    children: [{
        path: 'InsuresOrdersList',
        name: 'InsuresOrdersList',
        component: Insuresorders
    },
    // 邓昌金 ~~~~~~~~~~~~~~~~~~~start
    {
        path: 'InsuresList',
        name: 'InsuresList',
        component: InsuresList
    },
    {
        path: 'UpdateSalesmansClaims    ',
        name: 'UpdateSalesmansClaims',
        component: UpdateSalesmansClaims
    },
    {
        path: 'TypesList',
        name: 'TypesList',
        component: TypesList,
    },
    // 邓昌金 ~~~~~~~~~~~~~~~~~~~ent
    {
        path: 'ModifyInsures/:_id',
        name: 'ModifyInsures',
        component: ModifyInsures
    },
    {
        path: 'OrdersList',
        name: 'OrdersList',
        component: OrdersList,
    },
    {

        path: 'Process',
        name: 'Process',
        component: Process,
    },
    //----dd----
    {
        path: 'AdminList',
        name: 'AdminList',
        component: AdminList,
    },
    {
        path: 'AdminAdd',
        name: 'AdminAdd',
        component: AdminAdd,
    },
    {

        path: 'AdminUpdate/:id',
        name: 'AdminUpdate',
        component: AdminUpdate,
    },

    {
        path: 'CustomerList',
        name: 'CustomerList',
        component: CustomerList
    },
    {
        path: 'CustomerAdd',
        name: 'CustomerAdd',
        component: CustomerAdd
    },
    {
        path: 'CustomerUpdate',
        name: 'CustomerUpdate',
        component: CustomerUpdate
    },
    {
        path: 'MyClaimsList',
        name: 'MyClaimsList',
        component: MyClaimsList
    },

    {
        path: 'SubmitClaimMsg',
        name: 'SubmitClaimMsg',
        component: SubmitClaimMsg
    },
    {
        path: 'ClaimsList',
        name: 'ClaimsList',
        component: ClaimsList
    },
    //王放--start
    //管理员系统--销售员列表渲染路由配置
    {
        path: 'SalesmansList',
        name: 'SalesmansList',
        component: SalesmansList
    },
    //管理员系统--销售员新增路由配置
    {
        path: 'SalesmansAdd',
        name: 'SalesmansAdd',
        component: SalesmansAdd
    },
    //管理员系统--销售员修改路由配置
    {
        path: 'SalesmansModify/:_id',
        props: true,
        name: 'SalesmansModify',
        component: SalesmansModify

    },
    //销售员系统--个人中心路由配置
    {
        path: 'SalesmansPersonally',
        name: 'SalesmansPersonally',
        component: SalesmansPersonally
    },
    //销售员系统--个人信息之修改密码
    {
        path: 'SalesmansPersonallyPassword',
        name: 'SalesmansPersonallyPassword',
        component: SalesmansPersonallyPassword
    },
    //王放--end
    {
        path: 'MycustomerList',
        name: 'MycustomerList',
        component: MycustomerList
    }
    ]
}
]

const router = new VueRouter({
    routes
})

export default router